class Person {
  String? name;
  int? age;

  getInfo() {
    // 其实没有告诉你，dart也是支持模板字符串的
    print('${this.name} ${this.age}');
  }

  void setInfo(String name, int age) {
    this.age = age;
    this.name = name;
  }
}

void main() {
  var p1 = new Person();
  p1.setInfo('lisi',22);
  p1.getInfo();
}
